The invention relates generally to devices and methods for communicating between a host computer and a peripheral device such as a keyboard or mouse and, more particularly, to recognizing and enumerating a peripheral device as a compliant Universal Serial Bus (USB) device and for performing other USB functions by using a micro-controller and a USB dedicated circuit interchangeably.
A common personal computer system has a main central processing unit (CPU) enclosed within a housing and one or more peripheral devices, such as a keyboard, a mouse, a monitor, a modem or a printer physically connected to the housing and electrically connected to the CPU by a different connector, i.e., ports, and different electrical buses, respectively. Each device typically has a different type of xe2x80x9cstandardxe2x80x9d interface connector and bus. These different connectors and electrical buses include serial buses, parallel buses and RS-232 ports. Typically, each of these different buses has different signaling requirements and requires different connectors to the housing. For example, a parallel bus has a certain physical connector and communicates bits of data in parallel, i.e., a predetermined number of bits at the same time. In contrast, a serial bus may have a different physical connector and may transmit bits of data in a serial manner, i.e., one bit at a time.
In order to connect different peripheral devices to a personal computer, it has often been necessary to use several different types of standard local electrical buses and associated ports, such as serial ports for a modem, a mouse and a keyboard and a parallel port for the printer. This led to unnecessary complexity since each peripheral device may use a different connection and bus. To establish some standard and avoid such complexity, the USB was created to make the task of connecting peripheral devices to the computer easier. The USB replaces the multiple cable, ports and physical connectors with a single standardized connection system. The USB also permits peripheral devices to be connected to and disconnected from the bus while the computer system is powered up. This eliminates the need to shut down and xe2x80x9cre-bootxe2x80x9d the computer every time that a peripheral device is connected or disconnected, as is the case with most other non-USB buses. The USB further permits a peripheral device connected to the USB to be detected and the port to be appropriately configured automatically using a configuration process for the device known as enumeration.
When a peripheral device is first connected to the USB and a host computer through a standard USB communications port, the presence of the connected peripheral device is detected by the host computer and enumeration begins. In the enumeration process, the host computer assigns a unique USB address to the connected peripheral device, queries the connected peripheral device about its requirements and capabilities, writes data about the connected peripheral device into the host computer""s operating system, and loads the appropriate software device driver from a storage location into the host computer""s operating system. During the query, a data table stored in the peripheral device, which contains the particular peripheral device""s configuration information, is read from the peripheral device into the host computer""s memory and is used by the host computer""s software device driver to control the peripheral device. Upon completion of the enumeration process, the connected peripheral device is recognized by the host computer""s operating system, allowing its functions to be used by the host computer in executing application software. The association of the device with the software device driver cannot be subsequently changed.
During enumeration, a micro-controller used to control the transmission of data from the peripheral device must respond to the host. Thus, the micro-controller must be active prior to enumeration in order to respond when the host requests or sends data. There exist, however, peripheral devices having programmable control modules that operate entirely by software and that allow a host computer to modify the device""s characteristics by downloading software code into the device""s control memory. Before enumeration in these types of devices, the on-chip random access memory (RAM) powers on in an unknown state, leaving the micro-controller unable to respond to any requests by the host. This leaves the microprocessor physically connected, but not functionally connected. There are, however, a certain number of commands that must be supported during enumeration and that are needed before the micro-controller is loaded with code in the micro-controller""s on-chip RAM. Therefore, the micro-controller must have access to certain software code that pertains to these commands and must be sufficiently active in order to respond to the host computer to enumerate the device.
Although the USB provides a number of advantages over standard peripheral device connection techniques, the USB does not provide a system and method for easily enumerating a device before the device""s micro-controller has access to control code in its associated RAM. Lacking this, it is unable to automatically enumerate the peripheral device. Therefore, all software driven devices must be loaded with the proper code prior to connecting the device to the USB. Thus, it is desirable to provide a device and method for enumerating a software driven peripheral device when it is first connected to a USB and before code is loaded into the device""s RAM, as well as to facilitate automatic enumeration of peripheral devices. It is to these ends that the present invention is directed.
The invention provides a circuit for use in a control system of a peripheral device that is dedicated to a number of USB related functions for efficient execution of data transfer operations between a host computer and a device via a USB. The invention affords a USB dedicated circuit that is configured to respond to a host computer when a device is first connected to a USB so that the host computer can recognize and enumerate the device without engaging the device""s micro-controller. In another aspect, the invention provides a USB dedicated circuit that is configured to work in conjunction with the device""s micro-controller to perform other USB related tasks in an efficient manner to free up data traffic in the device""s micro-controller and allows the device to utilize a lower performance micro-controller.